import Main from '@/view/main'
import parentView from '@/components/parent-view'

/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面不会缓存
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 * }
 */

export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true
    },
    component: () => import('@/view/login/login.vue')
  },
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          hideInMenu: true,
          title: '首页',
          notCache: true
        },
        component: () => import('@/view/single-page/home')
      }
    ]
  },
  // {
  //   path: '',
  //   name: 'doc',
  //   meta: {
  //     title: '文档',
  //     href: 'https://lison16.github.io/iview-admin-doc/#/',
  //     icon: 'ios-book'
  //   }
  // },
  // {
  //   path: '/join',
  //   name: 'join',
  //   component: Main,
  //   children: [
  //     {
  //       path: 'join_page',
  //       name: 'join_page',
  //       meta: {
  //         icon: '_qq',
  //         title: 'QQ群'
  //       },
  //       component: () => import('@/view/join-page.vue')
  //     }
  //   ]
  // },
  {
    path: '/user',
    name: 'user',
    meta: {
      icon: 'logo-buffer',
      title: '用户'
    },
    component: Main,
    children: [
      {
        path: 'getusers',
        name: 'getusers',
        meta: {
          icon: 'md-trending-up',
          title: '用户'
        },
        component: () => import('@/view/admin/user/user.vue')
      },
    ]
  },
  {
    path: '/usercard',
    name: 'usercard',
    meta: {
      icon: 'logo-buffer',
      title: '会员卡'
    },
    component: Main,
    children: [
      {
        path: 'getusercard',
        name: 'getusercard',
        meta: {
          icon: 'md-trending-up',
          title: '会员卡'
        },
        component: () => import('@/view/admin/usercard/usercard.vue')
      },
    ]
  },
  {
    path: '/personactivity',
    name: 'personactivity',
    meta: {
      icon: 'logo-buffer',
      title: '个人活动管理'
    },
    component: Main,
    children: [
      {
        path: 'getactivity',
        name: 'getactivity',
        meta: {
          icon: 'md-trending-up',
          title: '个人活动'
        },
        component: () => import('@/view/admin/personactivity/activity.vue')
      },
    ]
  },
  {
    path: '/merchants',
    name: 'merchants',
    meta: {
      icon: 'logo-buffer',
      title: '商户管理'
    },
    component: Main,
    children: [
      {
        path: 'getmerchants',
        name: 'getmerchants',
        meta: {
          icon: 'md-trending-up',
          title: '商户列表'
        },
        component: () => import('@/view/admin/merchants/merchants.vue')
      },
      {
        path: 'activities',
        name: 'activities',
        meta: {
          icon: 'md-trending-up',
          title: '商户活动'
        },
        component: () => import('@/view/admin/merchants/merchants-activity.vue')
      },
      {
        path: 'type',
        name: 'type',
        meta: {
          icon: 'md-trending-up',
          title: '商户类别'
        },
        component: () => import('@/view/admin/merchants/merchants-type.vue')
      },
    ]
  },
 
  
  // {
  //   path: '/401',
  //   name: 'error_401',
  //   meta: {
  //     hideInMenu: true
  //   },
  //   component: () => import('@/view/error-page/401.vue')
  // },
  // {
  //   path: '/500',
  //   name: 'error_500',
  //   meta: {
  //     hideInMenu: true
  //   },
  //   component: () => import('@/view/error-page/500.vue')
  // },
  // {
  //   path: '*',
  //   name: 'error_404',
  //   meta: {
  //     hideInMenu: true
  //   },
  //   component: () => import('@/view/error-page/404.vue')
  // }
]
